﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.ManagerModel>" %>
<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	管理员设置
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
    <%=Html.ActionLink("添加", "Add", null, new { @class="a_blue"})%>
    <table class="table" width="100%">
        <tr class="th"><th>登陆名</th><th>角色</th><th>状态</th><th>是否在线</th><th>添加时间</th><th>最后登录时间</th><th>操作</th></tr>
        <% foreach (var item in Model.Manages)%>
        <%{ %>
        <tr>
            <td><%=item.LoginName %></td>
            <td><%=item.RoleName %></td>
            <td><%=item.State.GetName() %></td>
            <td><%=item.Inline==null?"":item.Inline.Value?"在线":"离线" %></td>
            <td><%=item.AddTime.ToString("yyyy-MM-dd") %></td>
            <td><%=string.Format("{0:MM-dd HH:mm:ss}", item.LastLoginTime)%></td>
            <td>
                <%= Html.ActionLink("修改", "Edit", new { item.ID, returnUrl = Request.RawUrl }, new { @class = "a_blue" })%>
                <%=(Model.Current != item.ID) ? Html.ActionLink(item.State == AdminState.Normal ? "锁定" : "解锁", "EditState", new { item.ID, state = item.State == AdminState.Normal ? AdminState.Locked : AdminState.Normal }, new { @class = "a_blue"  ,onclick="return confirm('确定提交吗？')"}) : MvcHtmlString.Empty%>
            </td>
        </tr>
        <%} %>
    </table>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
</asp:Content>
